package com.aijk.commons.crud.dao;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by iscdw on 2016/3/13.
 */
public interface BaseMapper<BEAN,EXAMPLE,IDTYPE> {

    int countByExample(EXAMPLE example);

    int deleteByExample(EXAMPLE example);

    int deleteByPrimaryKey(IDTYPE id);

    int insert(BEAN record);

    int insertSelective(BEAN record);

    List<BEAN> selectByExample(EXAMPLE example);

    BEAN selectByPrimaryKey(IDTYPE id);

    int updateByExampleSelective(@Param("record") BEAN record, @Param("example") EXAMPLE example);

    int updateByExample(@Param("record") BEAN record, @Param("example") EXAMPLE example);

    int updateByPrimaryKeySelective(BEAN record);

    int updateByPrimaryKey(BEAN record);
}
